package com.blb.service.impl;

import com.blb.dao.CommentDao;
import com.blb.dao.impl.CommentDaoImpl;
import com.blb.pojo.Comment;
import com.blb.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class CommentServiceImpl implements ICommentService {
    @Autowired
    CommentDao commentDao;
    @Override
    public List<Comment> list() throws Exception {
        List<Comment> list = commentDao.list();
        return list;
    }



    /**
     * 删除
     * @param id
     * @throws SQLException
     */
    @Override
    public void delete(String id) throws SQLException {
        commentDao.delete(id);
    }
    @Override
    public void add(Comment comment) throws SQLException {
        commentDao.add(comment);
    }
}
